Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

static route expiry feature support in 202012 #12865

Merged
merged 1 commit into from
Nov 30, 2022
Merged

Conversation

jcaiMR
Copy link
Contributor

@jcaiMR jcaiMR commented Nov 29, 2022

static route expiry feature support in 202012. This is double commit job from master to 202012.

Why I did it

Modify BgpCfgD to support static route expiry

How I did it

Add a new class StaticRouteTimer to monitor old and unrefreshed static routes in APP DB and remove them

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

New key/value in appl_db:
sonic-db-cli APPL_DB hmset 'STATIC_ROUTE:default:5.5.5.0/24' nexthop 10.0.0.27 expiry 'false'
sonic-db-cli APPL_DB hmset 'STATIC_ROUTE:default:5.5.5.0/24' nexthop 10.0.0.27 expiry 'true' refresh 'true'

sonic-db-cli APPL_DB hmset 'STATIC_ROUTE:default:2001::1/64' nexthop 2002::1 expiry 'false'
sonic-db-cli APPL_DB hmset 'STATIC_ROUTE:default:2001::1/64' nexthop 2002::1 expiry 'true' refresh 'true'

expiry == 'false' means non-persistent static route, but will never expire in APPL_DB
refresh == 'true' means non-persistent static route and will be timeout under the control of STATIC_ROUTE_EXPIRY_TIME specified timeout value.

Copy link
Contributor

@StormLiangMS StormLiangMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lgtm-com
Copy link

lgtm-com bot commented Nov 29, 2022

This pull request introduces 1 alert when merging a7499c3 into 3c88bee - view on LGTM.com

new alerts:

  • 1 for Unused import

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine ⚙️ that powers LGTM.com. For more information, please check out our post on the GitHub blog.

@prsunny prsunny merged commit fe96679 into 202012 Nov 30, 2022
@lguohan lguohan deleted the dev/static_route_expiry branch December 20, 2022 09:56
github-actions bot pushed a commit to liushilongbuaa/sonic-buildimage that referenced this pull request Aug 29, 2023
Need to revert a series of commits:
```
ddb10c4 2022-11-25 | solution refine [jcaiMR]
42af278 2022-11-19 | fix thread exist when key not exists [jcaiMR]
5e80ab5 2022-11-16 | add static route expiry support [jcaiMR]
```
due to below reasons:
1. The commits are not "squash merged", so the prefix "Merged PR XXXX" is missing in commit title.
2. These commits are equal to a combined commit in public repo, which will block public/202012->internal-202012 auto merging
```
fe96679 2022-11-30 | static route expiry feature support (sonic-net#12865) [jcaiMR]
```

So reverting them and wait for auto merging to re-introduce the code to the target branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants